package com.itany.shop.service;

import com.itany.shop.entity.User;
import com.itany.shop.exception.RequestParameterErrorException;
import com.itany.shop.exception.UserExistException;
import com.itany.shop.exception.UserNotExistException;

/**
 * @author MissChen
 * @date 2024年03月29日 9:44
 */
public interface UserService {


    /**
     *
     * 用户注册
     * @param username 用户名，不能重复
     * @param password 密码
     * @param phone 手机号
     * @param address 地址
     * @throws RequestParameterErrorException
     * @throws UserExistException
     */
    public void register(String username,String password,String phone,String address) throws RequestParameterErrorException, UserExistException;

    /**
     * 用户登录
     * @param username 用户名
     * @param password 密码
     * @return
     * @throws RequestParameterErrorException
     * @throws UserNotExistException
     */
    public User login(String username, String password) throws RequestParameterErrorException, UserNotExistException;
}
